import Layout from '@/layout'

const orderRouter = {
  path: '/order',
  component: Layout,
  redirect: '/order/order_list',
  name: 'Order',
  meta: {
    title: '订单管理',
    icon: 'order'
  },
  children: [
    {
      path: 'order_list',
      name: 'OrderList',
      component: () => import('@/views/order/order-list'),
      meta: { title: '订单列表', noCache: false }
    },
    {
      path: 'order_detail',
      name: 'OrderDetail',
      hidden: true,
      component: () => import('@/views/order/order-detail'),
      meta: { title: '订单详情', noCache: true }
    },
    {
      path: 'batch_ship',
      name: 'BatchShip',
      hidden: true,
      component: () => import('@/views/order/ship/index'),
      meta: { title: '批量发货', noCache: true }
    },
    {
      path: 'order_tags',
      name: 'OrderTags',
      component: () => import('@/views/order/tags'),
      meta: { title: '评价标签', noCache: true }
    },
    {
      path: 'add_tags',
      name: 'AddTags',
      hidden: true,
      component: () => import('@/views/order/tags/form'),
      meta: { title: '新增评价标签', noCache: true }
    },
    {
      path: 'edit_tags',
      name: 'EditTags',
      hidden: true,
      component: () => import('@/views/order/tags/form'),
      meta: { title: '编辑评价标签', noCache: true }
    },
    {
      path: 'order_evaluate',
      name: 'OrderEvaluate',
      component: () => import('@/views/order/evaluate'),
      meta: { title: '订单评价', keepAlive: true }
    },
    {
      path: 'edit_evaluate',
      name: 'EditEvaluate',
      hidden: true,
      component: () => import('@/views/order/evaluate/appraise/appraise-detail'),
      meta: { title: '编辑评价', noCache: true }
    }
  ]
}

export default orderRouter
